\hypertarget{classclient_information}{
\section{client\-Information \-Class \-Reference}
\label{classclient_information}\index{client\-Information@{client\-Information}}
}


\hyperlink{class_client}{\-Client} helper methods.  




{\ttfamily \#include $<$clientinformation.\-h$>$}

\subsection*{\-Public \-Slots}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{classclient_information_a9edc0627eca71bb833a5b250ce5d1b78}{handle\-Remove\-Friend} (\hyperlink{classclient_information}{client\-Information} $\ast$person\-Sending\-Request, bool is\-Valid)
\begin{DoxyCompactList}\small\item\em \-Slot to handle the signal from removing a friend. \end{DoxyCompactList}\item 
void \hyperlink{classclient_information_ae2f64901a317f6b151e352e3054ab731}{handle\-Is\-Valid\-Remove\-Friend} (\-Q\-String person\-To\-Remove, bool is\-Valid)
\begin{DoxyCompactList}\small\item\em \-Slot to handle the signal from whether or not a valid remove friend request wsa sent. \end{DoxyCompactList}\item 
void \hyperlink{classclient_information_af6949cea8c0b3d89741e2915fe4eee83}{handle\-Add\-Friend} (\-Q\-String person\-Sending\-Request)
\begin{DoxyCompactList}\small\item\em \-Slot to handle the signal from adding a friend. \-The object that calls this slot is the user that the request is sent to. \end{DoxyCompactList}\item 
void \hyperlink{classclient_information_a520f5d73a13e6b6464673d4df8724116}{handle\-Is\-Valid\-Friend\-Request} (\-Q\-String person\-To\-Add, bool is\-Valid)
\begin{DoxyCompactList}\small\item\em \-Slot to handle the signal from checking if the friend request that was sent is valid or not. \end{DoxyCompactList}\item 
void \hyperlink{classclient_information_ae3a38d29143c06cffba8385cbb648809}{handle\-Friend\-Acceptance} (\hyperlink{classclient_information}{client\-Information} $\ast$sent\-User, bool is\-Accepted)
\begin{DoxyCompactList}\small\item\em \-Slot to handle the signal from a friend acceptance. \-The user that calls this slot is the user that is recieving the friend acceptance. \end{DoxyCompactList}\item 
void \hyperlink{classclient_information_aebdd7540395148bab15b27ac0ae63968}{handle\-Send\-Message} (\-Q\-String from\-User, \-Q\-String to\-User, \-Q\-String message, \-Q\-String time\-Sent)
\begin{DoxyCompactList}\small\item\em \-Slot to handle the signal from a sent message. \-The user that calls this slot is the user that is sending the message. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{\-Public \-Member \-Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classclient_information_a7190d81646cf44fde129d34446bafa97}{
\hyperlink{classclient_information_a7190d81646cf44fde129d34446bafa97}{client\-Information} (\-Q\-String name, \-Q\-Tcp\-Socket $\ast$socket)}
\label{classclient_information_a7190d81646cf44fde129d34446bafa97}

\begin{DoxyCompactList}\small\item\em \-Constructor with name and socket. \end{DoxyCompactList}\item 
\hypertarget{classclient_information_a37a0feeb256a95aa6265b04f091966b9}{
\hyperlink{classclient_information_a37a0feeb256a95aa6265b04f091966b9}{client\-Information} (\-Q\-String name, \-Q\-String\-List friends\-List)}
\label{classclient_information_a37a0feeb256a95aa6265b04f091966b9}

\begin{DoxyCompactList}\small\item\em \-Constructor with name and friends\-List. \end{DoxyCompactList}\item 
void \hyperlink{classclient_information_a002396f42cea76e92b47f8967afea8ad}{update\-Socket} (\-Q\-Tcp\-Socket $\ast$sock\-To\-Update\-To)
\begin{DoxyCompactList}\small\item\em \-Updates the current socket to a new socket. \end{DoxyCompactList}\item 
void \hyperlink{classclient_information_ab54225eaa4950b985aed1fc1afa8e743}{send\-Online\-Friends\-List} (\-Q\-List$<$ \-Q\-String $>$ server\-Users\-Online)
\begin{DoxyCompactList}\small\item\em \-Sends a list of friends online. \end{DoxyCompactList}\item 
\-Q\-Tcp\-Socket $\ast$ \hyperlink{classclient_information_a5edd8226de076e4819ed0c4890314403}{get\-Socket} ()
\item 
\-Q\-String \hyperlink{classclient_information_a720595dfe2672915c93a32b23247b96e}{get\-User\-Name} ()
\item 
bool \hyperlink{classclient_information_af9bf597778e57d9e35d9b754a6ab7bcc}{send\-Message} (\-Q\-String person\-That\-Sent\-Message, \-Q\-String message, \-Q\-String time\-Sent\-At)
\begin{DoxyCompactList}\small\item\em \-Sends message passed in to the person in the parameters with the time the message was sent at. \end{DoxyCompactList}\item 
bool \hyperlink{classclient_information_a2cd9e345db3e81e13774caa8d177c1e1}{add\-To\-Friends\-List} (\hyperlink{classclient_information}{client\-Information} $\ast$buddy)
\begin{DoxyCompactList}\small\item\em \-Adds the parameter user to the friends list of this user. \end{DoxyCompactList}\item 
bool \hyperlink{classclient_information_ae1b4d3d1500f4579a84493244ef8bde2}{remove\-From\-Friends\-List} (\hyperlink{classclient_information}{client\-Information} $\ast$non\-Friend)
\begin{DoxyCompactList}\small\item\em \-Removes the parameter user to the friends list of this user. \end{DoxyCompactList}\item 
bool \hyperlink{classclient_information_ace9eaf311dea9e224a428f6146a387e9}{is\-User\-Friend} (\-Q\-String user)
\begin{DoxyCompactList}\small\item\em \-Checks whether or not the parameter friend is in the friends list of this user. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{\-Private \-Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classclient_information_a0142b2adaae615cc2972937f71af6d53}{
\-Q\-String\-List \hyperlink{classclient_information_a0142b2adaae615cc2972937f71af6d53}{string\-List\-Of\-Friends}}
\label{classclient_information_a0142b2adaae615cc2972937f71af6d53}

\begin{DoxyCompactList}\small\item\em \-String\-List that contains the individual strings of the friends of this user. \end{DoxyCompactList}\item 
\hypertarget{classclient_information_a6ebc6a454c29fb48ed90931093e966bc}{
\-Q\-Hash$<$ \-Q\-String, \*
\hyperlink{classclient_information}{client\-Information} $\ast$ $>$ \hyperlink{classclient_information_a6ebc6a454c29fb48ed90931093e966bc}{table\-Of\-Friends}}
\label{classclient_information_a6ebc6a454c29fb48ed90931093e966bc}

\begin{DoxyCompactList}\small\item\em \-Table that contains the name of the user and its corresponding \hyperlink{classclient_information}{client\-Information} object pointer. \end{DoxyCompactList}\item 
\hypertarget{classclient_information_a544931963ab7110241057edeab615bce}{
\-Q\-String \hyperlink{classclient_information_a544931963ab7110241057edeab615bce}{user\-Name}}
\label{classclient_information_a544931963ab7110241057edeab615bce}

\begin{DoxyCompactList}\small\item\em \-Username of this person. \end{DoxyCompactList}\item 
\hypertarget{classclient_information_a58ca7874597d3b4e187b47ee249eca88}{
\-Q\-Tcp\-Socket $\ast$ \hyperlink{classclient_information_a58ca7874597d3b4e187b47ee249eca88}{sock}}
\label{classclient_information_a58ca7874597d3b4e187b47ee249eca88}

\begin{DoxyCompactList}\small\item\em \-Tcp\-Socket used in order to talk to the user. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{\-Detailed \-Description}
\hyperlink{class_client}{\-Client} helper methods. 

\-Container class for the user including socket, friends list, and other information. 

\subsection{\-Member \-Function \-Documentation}
\hypertarget{classclient_information_a2cd9e345db3e81e13774caa8d177c1e1}{
\index{client\-Information@{client\-Information}!add\-To\-Friends\-List@{add\-To\-Friends\-List}}
\index{add\-To\-Friends\-List@{add\-To\-Friends\-List}!clientInformation@{client\-Information}}
\subsubsection[{add\-To\-Friends\-List}]{\setlength{\rightskip}{0pt plus 5cm}bool client\-Information\-::add\-To\-Friends\-List (
\begin{DoxyParamCaption}
\item[{{\bf client\-Information} $\ast$}]{buddy}
\end{DoxyParamCaption}
)}}
\label{classclient_information_a2cd9e345db3e81e13774caa8d177c1e1}


\-Adds the parameter user to the friends list of this user. 


\begin{DoxyParams}{\-Parameters}
{\em buddy} & \hyperlink{classclient_information}{client\-Information} object of the user to add as a friend to this user \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{\-Returns}
\-A boolean value indicating whether or not the addition was successfully or not 
\end{DoxyReturn}
\hypertarget{classclient_information_a5edd8226de076e4819ed0c4890314403}{
\index{client\-Information@{client\-Information}!get\-Socket@{get\-Socket}}
\index{get\-Socket@{get\-Socket}!clientInformation@{client\-Information}}
\subsubsection[{get\-Socket}]{\setlength{\rightskip}{0pt plus 5cm}\-Q\-Tcp\-Socket $\ast$ client\-Information\-::get\-Socket (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{classclient_information_a5edd8226de076e4819ed0c4890314403}
get\-Socket method \begin{DoxyReturn}{\-Returns}
\-A \-Q\-Tcp\-Socket being used 
\end{DoxyReturn}
\hypertarget{classclient_information_a720595dfe2672915c93a32b23247b96e}{
\index{client\-Information@{client\-Information}!get\-User\-Name@{get\-User\-Name}}
\index{get\-User\-Name@{get\-User\-Name}!clientInformation@{client\-Information}}
\subsubsection[{get\-User\-Name}]{\setlength{\rightskip}{0pt plus 5cm}\-Q\-String client\-Information\-::get\-User\-Name (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{classclient_information_a720595dfe2672915c93a32b23247b96e}
get\-User\-Name method \begin{DoxyReturn}{\-Returns}
\-A \-Q\-String username being used 
\end{DoxyReturn}
\hypertarget{classclient_information_af6949cea8c0b3d89741e2915fe4eee83}{
\index{client\-Information@{client\-Information}!handle\-Add\-Friend@{handle\-Add\-Friend}}
\index{handle\-Add\-Friend@{handle\-Add\-Friend}!clientInformation@{client\-Information}}
\subsubsection[{handle\-Add\-Friend}]{\setlength{\rightskip}{0pt plus 5cm}void client\-Information\-::handle\-Add\-Friend (
\begin{DoxyParamCaption}
\item[{\-Q\-String}]{person\-Sending\-Request}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}slot\mbox{]}}}}
\label{classclient_information_af6949cea8c0b3d89741e2915fe4eee83}


\-Slot to handle the signal from adding a friend. \-The object that calls this slot is the user that the request is sent to. 


\begin{DoxyParams}{\-Parameters}
{\em person\-Sending\-Request} & \-Q\-String name of the person that sent the add friend request \\
\hline
\end{DoxyParams}
\hypertarget{classclient_information_ae3a38d29143c06cffba8385cbb648809}{
\index{client\-Information@{client\-Information}!handle\-Friend\-Acceptance@{handle\-Friend\-Acceptance}}
\index{handle\-Friend\-Acceptance@{handle\-Friend\-Acceptance}!clientInformation@{client\-Information}}
\subsubsection[{handle\-Friend\-Acceptance}]{\setlength{\rightskip}{0pt plus 5cm}void client\-Information\-::handle\-Friend\-Acceptance (
\begin{DoxyParamCaption}
\item[{{\bf client\-Information} $\ast$}]{sent\-User, }
\item[{bool}]{is\-Accepted}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}slot\mbox{]}}}}
\label{classclient_information_ae3a38d29143c06cffba8385cbb648809}


\-Slot to handle the signal from a friend acceptance. \-The user that calls this slot is the user that is recieving the friend acceptance. 


\begin{DoxyParams}{\-Parameters}
{\em sent\-User} & \hyperlink{classclient_information}{client\-Information} object of the person that sent the add friend request \\
\hline
{\em is\-Accepted} & boolean value indicating if the request was accepted or not \\
\hline
\end{DoxyParams}
\hypertarget{classclient_information_a520f5d73a13e6b6464673d4df8724116}{
\index{client\-Information@{client\-Information}!handle\-Is\-Valid\-Friend\-Request@{handle\-Is\-Valid\-Friend\-Request}}
\index{handle\-Is\-Valid\-Friend\-Request@{handle\-Is\-Valid\-Friend\-Request}!clientInformation@{client\-Information}}
\subsubsection[{handle\-Is\-Valid\-Friend\-Request}]{\setlength{\rightskip}{0pt plus 5cm}void client\-Information\-::handle\-Is\-Valid\-Friend\-Request (
\begin{DoxyParamCaption}
\item[{\-Q\-String}]{person\-To\-Add, }
\item[{bool}]{is\-Valid}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}slot\mbox{]}}}}
\label{classclient_information_a520f5d73a13e6b6464673d4df8724116}


\-Slot to handle the signal from checking if the friend request that was sent is valid or not. 


\begin{DoxyParams}{\-Parameters}
{\em person\-To\-Add} & \-Q\-String name of the person that sent the add friend request \\
\hline
{\em is\-Valid} & boolean value indicating if the request was valid or not \\
\hline
\end{DoxyParams}
\hypertarget{classclient_information_ae2f64901a317f6b151e352e3054ab731}{
\index{client\-Information@{client\-Information}!handle\-Is\-Valid\-Remove\-Friend@{handle\-Is\-Valid\-Remove\-Friend}}
\index{handle\-Is\-Valid\-Remove\-Friend@{handle\-Is\-Valid\-Remove\-Friend}!clientInformation@{client\-Information}}
\subsubsection[{handle\-Is\-Valid\-Remove\-Friend}]{\setlength{\rightskip}{0pt plus 5cm}void client\-Information\-::handle\-Is\-Valid\-Remove\-Friend (
\begin{DoxyParamCaption}
\item[{\-Q\-String}]{person\-To\-Remove, }
\item[{bool}]{is\-Valid}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}slot\mbox{]}}}}
\label{classclient_information_ae2f64901a317f6b151e352e3054ab731}


\-Slot to handle the signal from whether or not a valid remove friend request wsa sent. 


\begin{DoxyParams}{\-Parameters}
{\em person\-To\-Remove} & \hyperlink{classclient_information}{client\-Information} object of the user to to remove \\
\hline
{\em is\-Valid} & boolean value indicating if this remove operation is valid or not \\
\hline
\end{DoxyParams}
\hypertarget{classclient_information_a9edc0627eca71bb833a5b250ce5d1b78}{
\index{client\-Information@{client\-Information}!handle\-Remove\-Friend@{handle\-Remove\-Friend}}
\index{handle\-Remove\-Friend@{handle\-Remove\-Friend}!clientInformation@{client\-Information}}
\subsubsection[{handle\-Remove\-Friend}]{\setlength{\rightskip}{0pt plus 5cm}void client\-Information\-::handle\-Remove\-Friend (
\begin{DoxyParamCaption}
\item[{{\bf client\-Information} $\ast$}]{person\-Sending\-Request, }
\item[{bool}]{is\-Valid}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}slot\mbox{]}}}}
\label{classclient_information_a9edc0627eca71bb833a5b250ce5d1b78}


\-Slot to handle the signal from removing a friend. 


\begin{DoxyParams}{\-Parameters}
{\em person\-Sending\-Request} & \hyperlink{classclient_information}{client\-Information} object of the user to to remove \\
\hline
{\em is\-Valid} & boolean value indicating if this remove operation is valid or not \\
\hline
\end{DoxyParams}
\hypertarget{classclient_information_aebdd7540395148bab15b27ac0ae63968}{
\index{client\-Information@{client\-Information}!handle\-Send\-Message@{handle\-Send\-Message}}
\index{handle\-Send\-Message@{handle\-Send\-Message}!clientInformation@{client\-Information}}
\subsubsection[{handle\-Send\-Message}]{\setlength{\rightskip}{0pt plus 5cm}void client\-Information\-::handle\-Send\-Message (
\begin{DoxyParamCaption}
\item[{\-Q\-String}]{from\-User, }
\item[{\-Q\-String}]{to\-User, }
\item[{\-Q\-String}]{message, }
\item[{\-Q\-String}]{time\-Sent}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}slot\mbox{]}}}}
\label{classclient_information_aebdd7540395148bab15b27ac0ae63968}


\-Slot to handle the signal from a sent message. \-The user that calls this slot is the user that is sending the message. 


\begin{DoxyParams}{\-Parameters}
{\em from\-User} & \-The from user \\
\hline
{\em to\-User} & \-The to user \\
\hline
{\em message} & \-The message being sent \\
\hline
{\em time\-Sent} & \-The time the message was sent \\
\hline
\end{DoxyParams}
\hypertarget{classclient_information_ace9eaf311dea9e224a428f6146a387e9}{
\index{client\-Information@{client\-Information}!is\-User\-Friend@{is\-User\-Friend}}
\index{is\-User\-Friend@{is\-User\-Friend}!clientInformation@{client\-Information}}
\subsubsection[{is\-User\-Friend}]{\setlength{\rightskip}{0pt plus 5cm}bool client\-Information\-::is\-User\-Friend (
\begin{DoxyParamCaption}
\item[{\-Q\-String}]{user}
\end{DoxyParamCaption}
)}}
\label{classclient_information_ace9eaf311dea9e224a428f6146a387e9}


\-Checks whether or not the parameter friend is in the friends list of this user. 


\begin{DoxyParams}{\-Parameters}
{\em user} & \-Q\-String name of user to check if it exists in the friend's list \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{\-Returns}
\-A boolean value indicating whether or not the user exists or not 
\end{DoxyReturn}
\hypertarget{classclient_information_ae1b4d3d1500f4579a84493244ef8bde2}{
\index{client\-Information@{client\-Information}!remove\-From\-Friends\-List@{remove\-From\-Friends\-List}}
\index{remove\-From\-Friends\-List@{remove\-From\-Friends\-List}!clientInformation@{client\-Information}}
\subsubsection[{remove\-From\-Friends\-List}]{\setlength{\rightskip}{0pt plus 5cm}bool client\-Information\-::remove\-From\-Friends\-List (
\begin{DoxyParamCaption}
\item[{{\bf client\-Information} $\ast$}]{non\-Friend}
\end{DoxyParamCaption}
)}}
\label{classclient_information_ae1b4d3d1500f4579a84493244ef8bde2}


\-Removes the parameter user to the friends list of this user. 


\begin{DoxyParams}{\-Parameters}
{\em non\-Friend} & \hyperlink{classclient_information}{client\-Information} object of the user to remove as a friend to this user \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{\-Returns}
\-A boolean value indicating whether or not the addition was successfully or not 
\end{DoxyReturn}
\hypertarget{classclient_information_af9bf597778e57d9e35d9b754a6ab7bcc}{
\index{client\-Information@{client\-Information}!send\-Message@{send\-Message}}
\index{send\-Message@{send\-Message}!clientInformation@{client\-Information}}
\subsubsection[{send\-Message}]{\setlength{\rightskip}{0pt plus 5cm}bool client\-Information\-::send\-Message (
\begin{DoxyParamCaption}
\item[{\-Q\-String}]{person\-That\-Sent\-Message, }
\item[{\-Q\-String}]{message, }
\item[{\-Q\-String}]{time\-Sent\-At}
\end{DoxyParamCaption}
)}}
\label{classclient_information_af9bf597778e57d9e35d9b754a6ab7bcc}


\-Sends message passed in to the person in the parameters with the time the message was sent at. 


\begin{DoxyParams}{\-Parameters}
{\em person\-That\-Sent\-Message} & \-The \-Q\-String of the user that the message was sent from \\
\hline
{\em message} & \-The \-Q\-String of the user that the message is going to be sent to \\
\hline
{\em time\-Sent\-At} & \-The time the message was sent \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{\-Returns}
\-A boolean value indicating whether or not the message was successfully sent 
\end{DoxyReturn}
\hypertarget{classclient_information_ab54225eaa4950b985aed1fc1afa8e743}{
\index{client\-Information@{client\-Information}!send\-Online\-Friends\-List@{send\-Online\-Friends\-List}}
\index{send\-Online\-Friends\-List@{send\-Online\-Friends\-List}!clientInformation@{client\-Information}}
\subsubsection[{send\-Online\-Friends\-List}]{\setlength{\rightskip}{0pt plus 5cm}void client\-Information\-::send\-Online\-Friends\-List (
\begin{DoxyParamCaption}
\item[{\-Q\-List$<$ \-Q\-String $>$}]{server\-Users\-Online}
\end{DoxyParamCaption}
)}}
\label{classclient_information_ab54225eaa4950b985aed1fc1afa8e743}


\-Sends a list of friends online. 


\begin{DoxyParams}{\-Parameters}
{\em server\-Users\-Online} & \-The \-Q\-List of users online \\
\hline
\end{DoxyParams}
\hypertarget{classclient_information_a002396f42cea76e92b47f8967afea8ad}{
\index{client\-Information@{client\-Information}!update\-Socket@{update\-Socket}}
\index{update\-Socket@{update\-Socket}!clientInformation@{client\-Information}}
\subsubsection[{update\-Socket}]{\setlength{\rightskip}{0pt plus 5cm}void client\-Information\-::update\-Socket (
\begin{DoxyParamCaption}
\item[{\-Q\-Tcp\-Socket $\ast$}]{sock\-To\-Update\-To}
\end{DoxyParamCaption}
)}}
\label{classclient_information_a002396f42cea76e92b47f8967afea8ad}


\-Updates the current socket to a new socket. 


\begin{DoxyParams}{\-Parameters}
{\em sock\-To\-Update\-To} & \-The \-Q\-Tcp\-Socket to update \\
\hline
\end{DoxyParams}


\-The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
/\-Users/plamontagna/\-Documents/spa-\/cs340project/\-Chat\-Server/\hyperlink{clientinformation_8h}{clientinformation.\-h}\item 
/\-Users/plamontagna/\-Documents/spa-\/cs340project/\-Chat\-Server/\hyperlink{clientinformation_8cpp}{clientinformation.\-cpp}\end{DoxyCompactItemize}
